from base.base_schemas import BaseEditSchema, BaseFilterSchema, BaseOutSchema
from typing import Optional
from pydantic import HttpUrl, IPvAnyAddress


class MessageOutSchema(BaseOutSchema):
    qq: str
    nickname: str
    website: Optional[HttpUrl]
    content: str
    browser: str
    system: str
    ip: Optional[IPvAnyAddress]


class MessageEditSchema(BaseEditSchema):
    qq: str
    nickname: str
    website: Optional[HttpUrl] = None
    content: str


class MessageFilterSchema(BaseFilterSchema):
    qq: Optional[str] = None
    nickname: Optional[str] = None
    content: Optional[str] = None
    browser: Optional[str] = None
    system: Optional[str] = None
